/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package decorator;

import java.awt.Component;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author Delvoux
 */
public class Main extends JFrame{

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        JPanel panel = new JPanel();

        Imagem imagem1 = new Imagem("imagem.jpg");

        //EFEITO SEPIA
        Sepia imgSepia = new Sepia();
        imgSepia.setGrau(50);
        imgSepia.add(imagem1);
        
        //EFEITO TONS DE CINZA
        TonsDeCinza imgCinza = new TonsDeCinza();
        imgCinza.add(imagem1);

        panel.add(new JLabel(new ImageIcon((BufferedImage)imagem1.draw())));
        panel.add(new JLabel(new ImageIcon((BufferedImage)imgSepia.draw())));
        panel.add(new JLabel(new ImageIcon((BufferedImage)imgCinza.draw())));

        JFrame frm = new JFrame();
        frm.getContentPane().add(panel);
        frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frm.pack();
        frm.setSize(800, 600);
        frm.show();


    }

}
